package net.ermannofranco.xml;

/**
 * Nodo di testo.
 * 
 * @author ermanno (ermanno.franco@gmail.com)
 * 
 */
public class TextNode implements Node {

	private static final long serialVersionUID = -451183134914363751L;
	private final String text;

	public TextNode(String text) {
		if (text == null)
			throw new UnsupportedOperationException("text null");
		this.text = text;
	}

	public String getName() {
		return text;
	}

	public final String toPrint() {
		return text;
	}

	public final String toSave() {
		return text;
	}

}
